package com.zm.core.config;

import org.apache.tomcat.util.http.fileupload.IOUtils;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver;
import org.springframework.core.io.Resource;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.util.Properties;

/**
 * Created by ZM on 2022/2/18 11:24
 */
public class GetParamsByProperties {//读取resources下ssh2.properties里面的配置信息

    //获取配置文件
    public static String readProperties(String param){
        String property="";
        try {
            Properties properties=new Properties();
            InputStream in = GetParamsByProperties.class.getResourceAsStream("/ssh2.properties");
            properties.load(in);
            property = properties.getProperty(param);
        } catch (IOException e) {
            e.printStackTrace();
        }
        return property;
    }

}
